home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / VBASIC / ATT.ZIP / ALLTHETI.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-04-20  |  23.1 KB  |  703 lines

  1. VERSION 2.00
  2. Begin Form AllTheTime 
  3.    AutoRedraw      =   -1  'True
  4.    BackColor       =   &H00C0C0C0&
  5.    BorderStyle     =   0  'None
  6.    Caption         =   "AllTheTime"
  7.    ClientHeight    =   0
  8.    ClientLeft      =   -1125
  9.    ClientTop       =   -240
  10.    ClientWidth     =   930
  11.    ClipControls    =   0   'False
  12.    ControlBox      =   0   'False
  13.    FillColor       =   &H00C0C0C0&
  14.    FillStyle       =   0  'Solid
  15.    FontBold        =   0   'False
  16.    FontItalic      =   0   'False
  17.    FontName        =   "MS Sans Serif"
  18.    FontSize        =   8.25
  19.    FontStrikethru  =   0   'False
  20.    FontUnderline   =   0   'False
  21.    Height          =   435
  22.    Icon            =   ALLTHETI.FRX:0000
  23.    Left            =   -1200
  24.    LinkTopic       =   "Form2"
  25.    MaxButton       =   0   'False
  26.    MinButton       =   0   'False
  27.    ScaleHeight     =   0
  28.    ScaleWidth      =   930
  29.    Top             =   -600
  30.    Visible         =   0   'False
  31.    Width           =   1080
  32.    Begin TextBox Text1 
  33.       Height          =   288
  34.       Left            =   2016
  35.       LinkTimeout     =   -1
  36.       TabIndex        =   5
  37.       Top             =   624
  38.       Visible         =   0   'False
  39.       Width           =   372
  40.    End
  41.    Begin PictureClip MoonSun 
  42.       Cols            =   5
  43.       Location        =   "1200,2400,2250,5430"
  44.       Picture         =   ALLTHETI.FRX:0302
  45.       Rows            =   10
  46.    End
  47.    Begin SSFrame Frame3D1 
  48.       ForeColor       =   &H00000000&
  49.       Height          =   195
  50.       Left            =   15
  51.       TabIndex        =   4
  52.       Top             =   8160
  53.       Width           =   135
  54.       Begin SSOption Option3D1 
  55.          Alignment       =   1  'Right Justify
  56.          Caption         =   "&3 - Bottom right"
  57.          ForeColor       =   &H00000000&
  58.          Height          =   255
  59.          Index           =   2
  60.          Left            =   1920
  61.          TabIndex        =   2
  62.          Top             =   960
  63.          Value           =   -1  'True
  64.          Width           =   1575
  65.       End
  66.       Begin SSOption Option3D1 
  67.          Caption         =   "&5 - Elsewhere"
  68.          ForeColor       =   &H00000000&
  69.          Height          =   255
  70.          Index           =   4
  71.          Left            =   1530
  72.          TabIndex        =   6
  73.          TabStop         =   0   'False
  74.          Top             =   615
  75.          Width           =   1575
  76.       End
  77.       Begin SSOption Option3D1 
  78.          Caption         =   "&1 - Upper left"
  79.          ForeColor       =   &H00000000&
  80.          Height          =   255
  81.          Index           =   0
  82.          Left            =   105
  83.          TabIndex        =   0
  84.          TabStop         =   0   'False
  85.          Top             =   255
  86.          Width           =   1455
  87.       End
  88.       Begin SSOption Option3D1 
  89.          Alignment       =   1  'Right Justify
  90.          Caption         =   "&2 - Upper right"
  91.          ForeColor       =   &H00000000&
  92.          Height          =   255
  93.          Index           =   1
  94.          Left            =   1920
  95.          TabIndex        =   1
  96.          TabStop         =   0   'False
  97.          Top             =   270
  98.          Width           =   1575
  99.       End
  100.       Begin SSOption Option3D1 
  101.          Caption         =   "&4 - Bottom left"
  102.          ForeColor       =   &H00000000&
  103.          Height          =   255
  104.          Index           =   3
  105.          Left            =   120
  106.          TabIndex        =   3
  107.          TabStop         =   0   'False
  108.          Top             =   960
  109.          Width           =   1575
  110.       End
  111.    End
  112.    Begin Image WarningSign 
  113.       Height          =   240
  114.       Left            =   1200
  115.       Top             =   30
  116.       Width           =   300
  117.    End
  118.    Begin Image WRed 
  119.       Height          =   240
  120.       Left            =   0
  121.       Top             =   1860
  122.       Visible         =   0   'False
  123.       Width           =   300
  124.    End
  125.    Begin Image Wyellow 
  126.       Height          =   240
  127.       Left            =   0
  128.       Top             =   1560
  129.       Visible         =   0   'False
  130.       Width           =   300
  131.    End
  132.    Begin Image WGreen 
  133.       Height          =   240
  134.       Left            =   0
  135.       Top             =   1260
  136.       Visible         =   0   'False
  137.       Width           =   300
  138.    End
  139.    Begin Image Delta 
  140.       Height          =   195
  141.       Left            =   795
  142.       Top             =   30
  143.       Width           =   195
  144.    End
  145.    Begin Image StopWatch 
  146.       Height          =   195
  147.       Left            =   570
  148.       Top             =   30
  149.       Width           =   195
  150.    End
  151.    Begin Image PrtStatus 
  152.       Height          =   240
  153.       Left            =   510
  154.       Top             =   10005
  155.       Width           =   300
  156.    End
  157.    Begin Image PrtInactive 
  158.       Height          =   240
  159.       Left            =   510
  160.       Top             =   10080
  161.       Width           =   285
  162.    End
  163.    Begin Image PrtActive 
  164.       Height          =   240
  165.       Left            =   510
  166.       Top             =   10080
  167.       Width           =   300
  168.    End
  169.    Begin Image Picture1 
  170.       Height          =   225
  171.       Left            =   30
  172.       Top             =   30
  173.       Width           =   240
  174.    End
  175.    Begin Image MoonPic 
  176.       Height          =   192
  177.       Left            =   300
  178.       Top             =   30
  179.       Width           =   192
  180.    End
  181.    Begin Image SeasonPic 
  182.       Height          =   192
  183.       Left            =   4080
  184.       Top             =   30
  185.       Width           =   192
  186.    End
  187. 'DefInt A-Z
  188. Const GroupFauxCompilerDirective = False
  189. Sub Delta_Click ()
  190. SoundABorted = True
  191. End Sub
  192. Sub Delta_DblClick ()
  193. SoundABorted = True
  194. 'DblCFlag% = True
  195. End Sub
  196. Sub Delta_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  197. Dim M3&
  198. 'Delta.Picture = MoonSun.GraphicCell(46)
  199. Call Form_MouseDown(Button, Shift, X, Y)
  200. If Button = 1 Then 'Left button
  201.    If gDeltaRunning = 2 Then
  202.       'start timer
  203.       gResUser = GetFreeSystemResources(GFSR_USERRESOURCES) - (gStoppedResUser - gResUser)
  204.       gResGDI = GetFreeSystemResources(GFSR_GDIRESOURCES) - (gStoppedResGDI - gResGDI)
  205.       gRes = GetFreeSystemResources(GFSR_SYSTEMRESOURCES) - (gStoppedRes - gRes)
  206.       gTotMem = GetTotalMem() - (gStoppedTotMem - gTotMem)
  207.       gBlkMem = GetBlockMem(gFreeableRAM, M3) - (gStoppedBlkMem - gBlkMem)
  208.       gFreeRAM = M3 - (gStoppedFreeRam - gFreeRAM)
  209.       Delta.Picture = MoonSun.GraphicCell(47)
  210.       LastTime& = 0
  211.       'FontChangedNotYetSized = True
  212.       gDeltaRunning = 1
  213.    Else
  214.       'stop timer
  215.       
  216.       gStoppedResUser = GetFreeSystemResources(GFSR_USERRESOURCES)
  217.       gStoppedResGDI = GetFreeSystemResources(GFSR_GDIRESOURCES)
  218.       gStoppedRes = GetFreeSystemResources(GFSR_SYSTEMRESOURCES)
  219.       gStoppedTotMem = GetTotalMem()
  220.       gStoppedBlkMem = GetBlockMem(gStoppedFreeAbleRam, gStoppedFreeRam)
  221.       LastTime& = 0
  222.       Delta.Picture = MoonSun.GraphicCell(48)
  223.       gDeltaRunning = 2
  224.    End If
  225. End If
  226. If Button = 2 Then
  227.       gResUser = GetFreeSystemResources(GFSR_USERRESOURCES)
  228.       gResGDI = GetFreeSystemResources(GFSR_GDIRESOURCES)
  229.       gRes = GetFreeSystemResources(GFSR_SYSTEMRESOURCES)
  230.       gTotMem = GetTotalMem()
  231.       gBlkMem = GetBlockMem(gFreeableRAM, gFreeRAM)
  232.       gStoppedResUser = GetFreeSystemResources(GFSR_USERRESOURCES)
  233.       gStoppedResGDI = GetFreeSystemResources(GFSR_GDIRESOURCES)
  234.       gStoppedRes = GetFreeSystemResources(GFSR_SYSTEMRESOURCES)
  235.       gStoppedTotMem = GetTotalMem()
  236.       gStoppedBlkMem = GetBlockMem(gStoppedFreeAbleRam, gStoppedFreeRam)
  237.       LastTime& = 0
  238. End If
  239. Exit Sub
  240. If (gDeltaRunning = 0) Or (gDeltaRunning = 2 And Button = 2) Then
  241.    If (gDeltaRunning = 0) Then
  242.       gResUser = GetFreeSystemResources(GFSR_USERRESOURCES)
  243.       gResGDI = GetFreeSystemResources(GFSR_GDIRESOURCES)
  244.       gRes = GetFreeSystemResources(GFSR_SYSTEMRESOURCES)
  245.       gTotMem = GetTotalMem()
  246.       gBlkMem = GetBlockMem(gFreeableRAM, gFreeRAM)
  247.    Else
  248.       gResUser = GetFreeSystemResources(GFSR_USERRESOURCES) - (gStoppedResUser - gResUser)
  249.       gResGDI = GetFreeSystemResources(GFSR_GDIRESOURCES) - (gStoppedResGDI - gResGDI)
  250.       gRes = GetFreeSystemResources(GFSR_SYSTEMRESOURCES) - (gStoppedRes - gRes)
  251.       gTotMem = GetTotalMem() - (gStoppedTotMem - gTotMem)
  252.       gBlkMem = GetBlockMem(gFreeableRAM, gFreeRAM) - (gStoppedBlkMem - gBlkMem)
  253.    End If
  254.    gDeltaRunning = 1
  255.    Delta.Picture = MoonSun.GraphicCell(47)
  256.    LastTime& = 0
  257.    If gDeltaRunning = 1 Then
  258.       gDeltaRunning = 2
  259.       gStoppedResUser = GetFreeSystemResources(GFSR_USERRESOURCES)
  260.       gStoppedResGDI = GetFreeSystemResources(GFSR_GDIRESOURCES)
  261.       gStoppedRes = GetFreeSystemResources(GFSR_SYSTEMRESOURCES)
  262.       gStoppedTotMem = GetTotalMem()
  263.       gStoppedBlkMem = GetBlockMem(gStoppedFreeAbleRam, gStoppedFreeRam)
  264.       LastTime& = 0
  265.       Delta.Picture = MoonSun.GraphicCell(48)
  266.    Else
  267.       Delta.Picture = MoonSun.GraphicCell(45)
  268.       gDeltaRunning = 0
  269.       gResUser = 0
  270.       gResGDI = 0
  271.       gRes = 0
  272.       gTotMem = 0
  273.       gBlkMem = 0
  274.       gFreeRAM = 0
  275.       gFreeableRAM = 0
  276.       LastTime& = 0
  277.    End If
  278. End If
  279. End Sub
  280. Sub Delta_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  281. Call Form_MouseMove(Button, Shift, X, Y)
  282. End Sub
  283. Sub Delta_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  284. Call Form_MouseUp(Button, Shift, X, Y)
  285. End Sub
  286. Sub Form_Activate ()
  287.     'MsgBox ("Activate...")
  288.       If AllTheTime.Left >= Screen.Width - 15 Then
  289.          AllTheTime.Left = AllTheTime.Tag
  290.       End If
  291. End Sub
  292. Sub Form_Click ()
  293. SoundABorted = True
  294. CFlag% = True
  295. End Sub
  296. Sub Form_DblClick ()
  297. DblCFlag% = True
  298. End Sub
  299. Sub Form_GotFocus ()
  300.       If AllTheTime.Left >= Screen.Width - 15 Then
  301.          AllTheTime.Left = AllTheTime.Tag
  302.       End If
  303. 'Settings.SetFocus
  304. End Sub
  305. Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
  306.     Select Case KeyCode
  307.         Case Alt_R      'Rotate
  308.             For I% = 0 To 4
  309.             If gOption3D1(I%) Then S% = I%
  310.             Next I%
  311.             gOption3D1((S% + 1) Mod 5) = True
  312.             gOption3D1(S%) = False
  313.             KeyCode = 0
  314.             Shift = 0
  315.             Call PositionATT
  316.         Case Alt_T      'Turn off
  317. '            KeyCode = 0
  318. '            Shift = 0
  319. '            AllTheTime.Visible = Not AllTheTime.Visible
  320.    End Select
  321. End Sub
  322. Sub Form_KeyPress (KeyAscii As Integer)
  323.     If KeyAscii = Asc("X") Then
  324.        'DeleteMenus
  325.        FinalProcessing
  326.        End 'Program
  327.     End If
  328. End Sub
  329. Sub Form_Load ()
  330. If hSubMenus <> 0 Then
  331.    MsgBox "Loading twice..."
  332.    End
  333. End If
  334. SeasonDescArr$(0) = "Fall"
  335. SeasonDescArr$(1) = "Winter"
  336. SeasonDescArr$(2) = "Spring"
  337. SeasonDescArr$(3) = "Summer"
  338. MoonDescArr$(0) = "Full moon"
  339. MoonDescArr$(1) = "Waning, full moon"
  340. MoonDescArr$(2) = "Third quarter"
  341. MoonDescArr$(3) = "Waning, third quarter"
  342. MoonDescArr$(4) = "New moon"
  343. MoonDescArr$(5) = "Waxing, new moon"
  344. MoonDescArr$(6) = "First quarter"
  345. MoonDescArr$(7) = "Waxing, first quarter"
  346. TODDescArr$(0) = "morning"
  347. TODDescArr$(1) = "afternoon"
  348. TODDescArr$(2) = "evening"
  349. TODDescArr$(3) = "night"
  350. If GroupFauxCompilerDirective Then
  351.    Text1.LinkMode = 0
  352.    Text1.LinkTopic = "Progman|Progman"
  353.    Text1.LinkItem = "Groups"
  354.    Text1.LinkMode = 2
  355.    Text1.LinkRequest
  356.    hGroupMenu = CreatePopUpMenu()
  357.    T% = AppendMenu(hMainMenu, MF_SEPARATOR, IDM_ITEMS, "-")
  358.    Groups$ = Text1.Text
  359.    While Groups$ <> ""
  360.       cPos = InStr(Groups$, Chr(13))
  361.       OneGroup$ = Left$(Groups$, cPos - 1)
  362.       Groups$ = Mid$(Groups$, cPos + 2, 30000)
  363.       hSubMenus = hSubMenus + 1
  364.       ReDim Preserve hSubMenu(hSubMenus)
  365.       hSubMenu(hSubMenus) = CreatePopUpMenu()   'popup
  366.       Text1.LinkItem = OneGroup$
  367.       Text1.LinkMode = 2
  368.       Text1.LinkRequest
  369.       Progs$ = Text1.Text
  370.       FirstOne = True
  371.       While Progs$ <> ""
  372.          cPos = InStr(Progs$, Chr(13))
  373.          OneProg$ = Left$(Progs$, cPos - 1)
  374.          Progs$ = Mid$(Progs$, cPos + 2, 30000)
  375.          PName$ = Mid$(OneProg$, 2, 30000)
  376.          PName$ = Mid$(PName$, 1, InStr(PName$, Chr(34)) - 1)
  377.          If FirstOne Then
  378.             FirstOne = False
  379.          Else
  380.             T% = AppendMenu(hSubMenu(hSubMenus), MF_STRING, IDM_ITEMS + hSubMenus, PName$)
  381.          End If
  382.       Wend
  383.       T% = AppendMenu(hGroupMenu, MF_POPUP, hSubMenu(hSubMenus), OneGroup$)
  384.    Wend
  385. T% = AppendMenu(hMainMenu, MF_POPUP, hGroupMenu, "Groups...")
  386. End If
  387. PrtActive.Picture = MoonSun.GraphicCell(20)
  388. PrtInActive.Picture = MoonSun.GraphicCell(21)
  389. PrtStatus.Picture = MoonSun.GraphicCell(21)
  390. StopWatch.Picture = MoonSun.GraphicCell(30)
  391. Delta.Picture = MoonSun.GraphicCell(47)
  392. Picture1.Picture = MoonSun.GraphicCell(22)
  393. WGreen.Picture = MoonSun.GraphicCell(43)
  394. WYellow.Picture = MoonSun.GraphicCell(44)
  395. WRed.Picture = MoonSun.GraphicCell(49)
  396. WarningSIgn.Picture = MoonSun.GraphicCell(43)
  397. End Sub
  398. Sub Form_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  399. MStartX = X
  400. MStartY = Y
  401. StartLeft = Left
  402. StartTop = Top
  403. AllowFormToMove = True
  404. Moved = True
  405. LastClickX = X
  406. If Shift <> 1 Then
  407.    'AutoRedraw = False   '1/15
  408.    'Beep
  409. End If
  410. End Sub
  411. Sub Form_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  412. If AllowFormToMove = True Then
  413.         AllTheTime.Left = AllTheTime.Left + (X - MStartX)
  414.         AllTheTime.Top = AllTheTime.Top + (Y - MStartY)
  415. End If
  416. End Sub
  417. Sub Form_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  418. AllowFormToMove = False
  419. 'AutoRedraw = True '1/15
  420. If Left = StartLeft And Top = StartTop Then
  421.    Moved = False
  422.    PosLeft = AllTheTime.Left
  423.    PosTop = AllTheTime.Top
  424.    gOption3D1(4) = True
  425.    For I% = 0 To 3
  426.       gOption3D1(I%) = False
  427.    Next I%
  428.    Call PositionATT
  429. End If
  430. End Sub
  431. Sub Form_Paint ()
  432. End Sub
  433. Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
  434. If UnloadMode = 3 Then
  435.    'DeleteMenus
  436.    FinalProcessing
  437.    End 'Program
  438. End If
  439. End Sub
  440. Sub Form_Resize ()
  441. 'SavedVis = Visible
  442. 'Visible = False
  443. If Resizing Then Exit Sub
  444. Resizing = True
  445. If WindowState = 1 Then
  446.    Exit Sub
  447. End If
  448. Call SetTime
  449. Call SetSize
  450. Call PositionATT
  451. 'Visible = SavedVis
  452. Resizing = False
  453. End Sub
  454. Sub MoonPic_DblClick ()
  455. SoundABorted = True
  456. gShowingMoons = True
  457. MoonList.Show 1
  458. End Sub
  459. Sub MoonPic_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  460. 'Call Form_MouseDown(Button, Shift, X, Y)
  461. 'Form1.Label1.FontName = AllTheTime.FontName
  462. 'Form1.Label1.ForeColor = AllTheTime.ForeColor
  463. 'If Form1.Label1.ForeColor = Form1.Label1.BackColor Then
  464. '   Form1.Label1.BackColor = AllTheTime.BackColor
  465. 'End If
  466. 'Form1.Label1.FontSize = AllTheTime.FontSize
  467. 'Form1.Label1.FontBold = AllTheTime.FontBold
  468. 'Form1.Label1.FontItalic = AllTheTime.FontItalic
  469. Form1.Label1.AutoSize = True
  470. If gMoonExact% Then gWaxDesc$ = ""
  471. Form1.Label1.Caption = " " + (gWaxDesc$) + MoonDesc$ + " " + SavedDat$ + " "
  472. Form1.Label1.AutoSize = False
  473. Form1.Label1.Width = Form1.Label1.Width + 60
  474. Form1.Label1.Height = Form1.Label1.Height + 60
  475. Form1.Width = Form1.Label1.Width
  476. Form1.Height = Form1.Label1.Height
  477. Form1.Label1.Left = 0
  478. Form1.Label1.Top = 0 + 15
  479. Form1.Top = AllTheTime.Top + Y - Form1.Height
  480. Form1.Left = AllTheTime.Left + MoonPic.Left + X
  481. If Form1.Top < 0 Then Form1.Top = 0
  482. If Form1.Left + Form1.Width > Screen.Width Then Form1.Left = Screen.Width - Form1.Width
  483. 'Form1.ZOrder 0
  484. Form1.Show
  485. wOn_Top% = SetWindowPos(Form1.hWnd, -1, 0, 0, 0, 0, wFlags = &H2 Or &H1 Or &H40 Or &H10)
  486. End Sub
  487. Sub MoonPic_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  488. Call Form_MouseMove(Button, Shift, X, Y)
  489. End Sub
  490. Sub MoonPic_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  491. 'Call Form_MouseUp(Button, Shift, X, Y)
  492. Unload Form1
  493. End Sub
  494. Sub Option3D1_Click (Index As Integer, Value As Integer)
  495. If gPositioning Then Exit Sub
  496. For I% = 0 To 4: gOption3D1(I%) = 0: Next I%
  497. gOption3D1(Index) = Value
  498. Call PositionATT
  499. End Sub
  500. Sub Picture1_DblClick ()
  501. Call PictureMenuMouseDown(0, 0, 0, 0)
  502. SoundABorted = True
  503. 'DblCFlag% = True
  504. End Sub
  505. Sub Picture1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  506. Call PictureMenuMouseDown(Button, Shift, X, Y)
  507. End Sub
  508. Sub PrtActive_Click ()
  509. SoundABorted = True
  510. End Sub
  511. Sub PrtActive_DblClick ()
  512. 'On Local Error Resume Next
  513. T% = Shell("PRINTMAN", 1)
  514. 'AppActivate "Print Manager"
  515. 'hActive% = GetActiveWindow()                 ' pickup it's hWnd handle
  516. 'Call SwitchToThisWindow(hActive%, True)
  517. 'On Local Error GoTo 0
  518. End Sub
  519. Sub PrtActive_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  520. Call Form_MouseDown(Button, Shift, X, Y)
  521. End Sub
  522. Sub PrtActive_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  523. Call Form_MouseMove(Button, Shift, X, Y)
  524. End Sub
  525. Sub PrtActive_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  526. Call Form_MouseUp(Button, Shift, X, Y)
  527. End Sub
  528. Sub PrtInactive_Click ()
  529. SoundABorted = True
  530. End Sub
  531. Sub PrtInactive_DblClick ()
  532. T% = Shell("PRINTMAN", 1)
  533. End Sub
  534. Sub PrtInactive_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  535. Call Form_MouseDown(Button, Shift, X, Y)
  536. PrtInActive.Picture = MoonSun.GraphicCell(20)
  537. End Sub
  538. Sub PrtInactive_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  539. Call Form_MouseMove(Button, Shift, X, Y)
  540. End Sub
  541. Sub PrtInactive_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  542. Call Form_MouseUp(Button, Shift, X, Y)
  543. PrtInActive.Picture = MoonSun.GraphicCell(21)
  544. End Sub
  545. Sub PrtStatus_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  546. Call Form_MouseMove(Button, Shift, X, Y)
  547. End Sub
  548. Sub SeasonPic_Click ()
  549. SoundABorted = True
  550. End Sub
  551. Sub SeasonPic_DblClick ()
  552. SoundABorted = True
  553. gShowingMoons = False
  554. MoonList.Show 1
  555. End Sub
  556. Sub SeasonPic_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  557. Dim Sunrise$, Sunset$
  558. Dim LongMinus$, LatMinus$
  559. 'Call Form_MouseDown(Button, Shift, x, Y)
  560. 'Form1.Label1.FontName = AllTheTime.FontName
  561. 'Form1.Label1.ForeColor = AllTheTime.ForeColor
  562. 'If Form1.Label1.ForeColor = Form1.Label1.BackColor Then
  563. '   Form1.Label1.BackColor = AllTheTime.BackColor
  564. 'End If
  565. 'Form1.Label1.FontSize = AllTheTime.FontSize
  566. 'Form1.Label1.FontBold = AllTheTime.FontBold
  567. 'Form1.Label1.FontItalic = AllTheTime.FontItalic
  568. If Right$(gLongitude, 1) = "E" Then LongMinus$ = "-" Else LongMinus$ = ""
  569. If Right$(gLatitude, 1) = "S" Then LatMinus$ = "-" Else LatMinus$ = ""
  570. For I% = 1 To TZs%
  571.   If InStr(TZ(I%), "(" + gTimezone + ")") <> 0 Then T$ = TZ(I%)
  572. Next I%
  573. T$ = Trim$(Mid$(T$, InStr(T$, ")") + 1, 200))
  574. Start = InStr(T$, ":")
  575. If Start > 0 Then
  576.   T$ = Format$(Val(Left$(T$, Start - 1)) + Val(Mid$(T$, Start + 1, 200)) / 100#)
  577.   'Mid(T$, Start, 1) = "."
  578. End If
  579. If Val(gDSTAuto) Then
  580.    Call CalcDSTStartStop(Now)
  581.    If (Now >= DSTStart) And (Now < DSTStop) Then
  582.       gDST = "-1"
  583.    Else
  584.       gDST = "0"
  585.    End If
  586. End If
  587. Call CalcSunRiseSet(LongMinus$ + Left$(gLongitude, Len(gLongitude) - 1), LatMinus$ + Left$(gLatitude, Len(gLatitude) - 1), Val(T$), Val(gDST), Now, Sunrise$, Sunset$)
  588. Form1.Label1.AutoSize = True
  589. Form1.Label1.Caption = " " + SeasonDesc$ + " " + TODDesc$ + " in " + gLocation + " " + Chr$(13) + " Sunrise: " + Sunrise$ + "   Sunset: " + Sunset$ + " "
  590. Form1.Label1.AutoSize = False
  591. Form1.Label1.Width = Form1.Label1.Width + 60
  592. Form1.Label1.Height = Form1.Label1.Height + 60
  593. Form1.Width = Form1.Label1.Width
  594. Form1.Height = Form1.Label1.Height
  595. Form1.Label1.Left = 0
  596. Form1.Label1.Top = 0 + 15
  597. Form1.Top = AllTheTime.Top + Y - Form1.Height
  598. Form1.Left = AllTheTime.Left + SeasonPic.Left + X - Form1.Label1.Width
  599. 'Form1.ZOrder 0
  600. If Form1.Top < 0 Then Form1.Top = 0
  601. If Form1.Left + Form1.Width > Screen.Width Then Form1.Left = Screen.Width - Form1.Width
  602. Form1.Show
  603. wOn_Top% = SetWindowPos(Form1.hWnd, -1, 0, 0, 0, 0, wFlags = &H2 Or &H1 Or &H40 Or &H10)
  604. End Sub
  605. Sub SeasonPic_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  606. Call Form_MouseMove(Button, Shift, X, Y)
  607. End Sub
  608. Sub SeasonPic_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  609. 'Call Form_MouseUp(Button, Shift, x, Y)
  610. Unload Form1
  611. End Sub
  612. Sub StopWatch_Click ()
  613. SoundABorted = True
  614. End Sub
  615. Sub StopWatch_DblClick ()
  616. SoundABorted = True
  617. 'DblCFlag% = True
  618. End Sub
  619. Sub StopWatch_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  620. Call Form_MouseDown(Button, Shift, X, Y)
  621. If Button = 1 Then 'Left button
  622.    If gTimerRunning = 2 Then
  623.       'start timer
  624.       gTime = Time - (gStoppedTime - gTime)
  625.       StopWatch.Picture = MoonSun.GraphicCell(30)
  626.       LastTime& = 0
  627.       'FontChangedNotYetSized = True
  628.       gTimerRunning = 1
  629.    Else
  630.       'stop timer
  631.       gStoppedTime = Time
  632.       LastTime& = 0
  633.       StopWatch.Picture = MoonSun.GraphicCell(25)
  634.       gTimerRunning = 2
  635.    End If
  636. End If
  637. If Button = 2 Then
  638.       gTime = Time
  639.       gStoppedTime = Time
  640.       LastTime& = 0
  641. End If
  642. Exit Sub
  643. If (gTimerRunning = 0) Or (gTimerRunning = 2 And Button = 2) Then
  644.    If (gTimerRunning = 0) Then
  645.       gTime = Time
  646.    Else
  647.       gTime = Time - (gStoppedTime - gTime)
  648.    End If
  649.    gTimerRunning = 1
  650.    StopWatch.Picture = MoonSun.GraphicCell(26)
  651.    gStopPic = 0
  652.    LastTime& = 0
  653.    If gTimerRunning = 1 Then
  654.       gTimerRunning = 2
  655.       gStoppedTime = Time
  656.       LastTime& = 0
  657.       StopWatch.Picture = MoonSun.GraphicCell(25)
  658.    Else
  659.       StopWatch.Picture = MoonSun.GraphicCell(24)
  660.       gTimerRunning = 1 'was 0
  661.       gTime = 0
  662.       LastTime& = 0
  663.       FontChangedNotYetSized = True
  664.    End If
  665. End If
  666. End Sub
  667. Sub StopWatch_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  668. Call Form_MouseMove(Button, Shift, X, Y)
  669. End Sub
  670. Sub StopWatch_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  671. Call Form_MouseUp(Button, Shift, X, Y)
  672. End Sub
  673. Sub WarningSign_Click ()
  674. SoundABorted = True
  675. End Sub
  676. Sub WarningSign_DblClick ()
  677. SoundABorted = True
  678. End Sub
  679. Sub WarningSign_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  680. Form1.Label1.AutoSize = True
  681. Form1.Label1.Caption = " " + gWarningMessage + " "
  682. Form1.Label1.AutoSize = False
  683. Form1.Label1.Width = Form1.Label1.Width + 60
  684. Form1.Label1.Height = Form1.Label1.Height + 60
  685. Form1.Width = Form1.Label1.Width
  686. Form1.Height = Form1.Label1.Height
  687. Form1.Label1.Left = 0
  688. Form1.Label1.Top = 0 + 15
  689. Form1.Top = AllTheTime.Top + Y - Form1.Height
  690. Form1.Left = AllTheTime.Left + WarningSIgn.Left + X
  691. 'Form1.ZOrder 0
  692. If Form1.Top < 0 Then Form1.Top = 0
  693. If Form1.Left + Form1.Width > Screen.Width Then Form1.Left = Screen.Width - Form1.Width
  694. Form1.Show
  695. wOn_Top% = SetWindowPos(Form1.hWnd, -1, 0, 0, 0, 0, wFlags = &H2 Or &H1 Or &H40 Or &H10)
  696. End Sub
  697. Sub WarningSign_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  698. Call Form_MouseMove(Button, Shift, X, Y)
  699. End Sub
  700. Sub WarningSign_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  701.    Unload Form1
  702. End Sub
  703.